export default {
    methods: {
        new_id() {
            var index = window.index || 0;
            var index = index + 1;
            window.index = index;
            return index;
            return `${this.rand(8)}`
        },
        rand(len) {
            var s = "";
            while (s.length < len && len > 0) {
                var r = Math.random();
                s += String.fromCharCode(Math.floor(r * 26) + (r > 0.5 ? 97 : 65));
            }
            return s;
        }
    }
}